import request from '@/utils/request'

/**
 * 查询外研社单词列表
 * @param query
 * @returns {*}
 */
export function findList(query) {
  return request({
    url: '/fltrp/words',
    method: 'get',
    params: query
  })
}

/**
 * 查询外研社单词详情
 * @param id
 * @returns {*}
 */
export function get(id) {
  return request({
    url: '/fltrp/words/' + id,
    method: 'get'
  })
}

/**
 * 新增外研社单词
 * @param data
 * @returns {*}
 */
export function add(data) {
  return request({
    url: '/fltrp/words',
    method: 'post',
    data: data
  })
}

/**
 * 修改外研社单词
  * @param data
 * @returns {*}
 */
export function update(data) {
  return request({
    url: '/fltrp/words',
    method: 'put',
    data: data
  })
}



/**
 * 删除外研社单词
 * @param id
 * @returns {*}
 */
export function remove(id) {
  return request({
    url: '/fltrp/words/' + id,
    method: 'delete'
  })
}

/**
 * 导出外研社单词
  * @param query
 * @returns {*}
 */
export function exportData(query) {
  return request({
    url: '/fltrp/words/export',
    method: 'get',
    params: query
  })
}

